import Vue from 'vue'
import VueRouter from 'vue-router'
import user from './modules/user.js'

Vue.use(VueRouter)
/* eslint-disable */ // 忽略该行往下 eslint的错误

const routes = [
  {
    path: '/',
    name: 'Home',
    component: ()=>import ('../views/Home'),
    children:[
     ...user
    ]
  },
  {
    path:'/login',
    meta:{
      titile:'登录界面'
    },
    component: () => import('../views/Login.vue')
  }
]

// 路由导航
// router.beforeEach((to,from,next)=>{
//   next()
// })

// router.afterEach((to,from,next)=>{
//   next()
// })

const router = new VueRouter({
  routes
})

export default router
